Remove the domain and VM paths from the store when destroying a domain. This
authoremellor@ewan <emellor@ewan>
Tue, 27 Sep 2005 13:36:58 +0000 (14:36 +0100)
committeremellor@ewan <emellor@ewan>
Tue, 27 Sep 2005 13:36:58 +0000 (14:36 +0100)
goes a long way towards fixing the problem of stale entries in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendDomainInfo.py

index 14410f9e6c1e2a4354412b1dd4a56ab2a799a4a4..a3d6739bec940d2fd5bdfcf2c81fbafd2f472e01 100644 (file)
@@ -976,10 +976,20 @@ class XendDomainInfo:
 
         self.cleanup()
 
+        try:
+            self.removeVm()
+        except Exception:
+            log.exception("Removing VM path failed.")
+
+        try:
+            self.removeDom()
+        except Exception:
+            log.exception("Removing domain path failed.")
+
         try:
             if self.domid is not None:
                 xc.domain_destroy(dom=self.domid)
-        except Exception, exn:
+        except Exception:
             log.exception("XendDomainInfo.destroy: xc.domain_destroy failed.")